package com.ruoyi.kenuo.netty;


import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;

/**
 * 处理群聊
 */
public class JoinGroupHandler {

    public static void execute(ChannelHandlerContext ctx, TextWebSocketFrame msg){
        //将Channel添加到ChannelGroup
        NettyServer.GROUP.add(ctx.channel());
        ChatHandler.execute(ctx,msg);
        ctx.channel().writeAndFlush(Result.success("加入系统默认群聊成功~"));
    }

}
